/*
2021-10-26
https://www.acwing.com/problem/content/4003/
*/
#include<cstring>
#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
    int T;
    cin>>T;
    while(T--)
    {
        int n,a,b;
        cin>>n>>a>>b;
        cout<<min(n-a,b+1)<<endl;
    }
    
    return 0;
}


